# _*_ utf-8 _*_

# 根据总价的范围，对总价进行打折操作
# 如果是3.8号再在原打折的基础上，继续打折操作

import time
now = time.localtime()
# print(now)
month = now.tm_mon      # 获取当前天所在的月份
day = now.tm_mday       # 获得当前月的第几天

goods_price = 0.0
goods_count = 0
total_price = 0
count = 1
choice = "y"
while choice == "y" or choice == "Y":
    goods_price = eval(input("请输入第{}件商品的单价：".format(count)))
    goods_count = eval(input("请输入第{}件商品的数量：".format(count)))
    count += 1
    total_price += goods_price * goods_count
    choice = input("是否继续？（y/Y 继续）")
temp = total_price
if total_price > 50000:
    total_price *= 0.7
if month == 4 and day == 21:                 # 3.8节 在原有的打折基础上再进行打折
    total_price *= 0.8
print("您总共消费：{:.1f}元，打折后您只需要支付：{:.1f}元".format(temp, total_price))
